package com.example.coffeejava.Dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {
    private Object data;
    private String errormsg;
    private Integer code;

    public static Result ok(Object data) {
        return new Result(data,null, 200);

    }
    public static Result error(String errormsg){
        return new Result(null,errormsg,500);
    }
}
